<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }

    .box {
      width: 500px;
      height: 300px;
      border: solid 1px black;
      margin: 10px auto;
      position: relative;
      overflow: hidden;
    }



    @keyframes abc {
      0% {}

      100% {
        transform: translateX(-520px);
      }
    }

    p {
      position: absolute;
      top: 23px;
      right: 0;
      /* 100% 指的是p元素自己的 100% */
      transform: translateX(100%);

      /* animation: abc 10s linear; */
    }
  </style>
</head>

<body>

  <div class="box">
    <p>hello world</p>
  </div>

</body>

</html>